<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <p align="center"><font size="4" color="coral" face="楷体">紧急联系人信息</font></p>
		<form action="${ctx }/admin/emergencyContact/save?id=${n.emid }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
				 <!-- 员工ID -->
                <input type="hidden" id="employee-id" name="employee.id" value="${n.employee.id }" class="form-control">
                 <%--<label class="col-sm-2 control-label">员工ID</label>--%>
                 <%--<div class="col-sm-4">
                 	<input type="hidden" id="employee-id" name="employee.id" value="${n.employee.id }" class="form-control">
                 	&lt;%&ndash;<input type="text"  placeholder="请选择员工ID" class="form-control" id="employee-name" value="${n.employee.id }"
                 		onclick="bring({
						                 	url:'${ctx}/admin/employee/search',
						                 	name: 'name',
						                 	idInput: 'employee-id',
						                 	nameInput: 'employee-name'
						                 	})" />
						                 	&ndash;%&gt;
                 </div>--%>
                 
				 <!-- 姓名 -->
                 <label class="col-sm-2 control-label">姓名</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="emname" value="${n.emname }">
                 </div>

                <!-- 关系 -->
                <label class="col-sm-2 control-label">关系</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" name="relation" value="${n.relation }">
                </div>
            </div>
            <div class="form-group">     
                 

                 
				 <!-- 联系电话 -->
                 <label class="col-sm-2 control-label">联系电话</label>
                 <div class="col-sm-4">
                 	<input type="text" class="form-control" name="emphone" value="${n.emphone }">
                 </div>

                <!-- 单位或住址 -->
                <label class="col-sm-2 control-label">单位或住址</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" name="emaddress" value="${n.emaddress }">
                </div>
            </div>

          <%--  <button type="button" class="sub-btn sub-btn-det" >添加</button>--%>
		</form>
</div>

<%@include file="/common/foot.jsp" %>
<script>
    $(document).on("click", ".sub-btn", function () {
        var form = $(this).parents("form");
        form.ajaxSubmit({
            success: function(data) {
                if (isSuccess(data)) {
                     reload();
                   // location.reload()
                } else {
                }
            }
        });
    });
</script>
</body>
</html>
